home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D Game Programming All in One
/
3D Game Programming All in One Disc.iso
/
3D2E
/
RESOURCES
/
CH6
/
EMAGA6
/
control
/
client
/
misc
/
screens.cs
< prev
next >
Wrap
Text File
|
2004-03-10
|
2KB
|
81 lines
//============================================================================
// control/client/misc/screens.cs
//
// Copyright (c) 2003 Kenneth C. Finney
//============================================================================
//-----------------------------------------------------------------------------
// PlayerInterface is the main TSControl through which the game is viewed.
// The PlayerInterface also contains the hud controls.
//-----------------------------------------------------------------------------
function PlayerInterface::onWake(%this)
{
$enableDirectInput = "1";
activateDirectInput();
// just update the action map here
playerKeymap.push();
// hack city - these controls are floating around and need to be clamped
schedule(0, 0, "refreshCenterTextCtrl");
schedule(0, 0, "refreshBottomTextCtrl");
}
function PlayerInterface::onSleep(%this)
{
// pop the keymaps
playerKeymap.pop();
}
//-----------------------------------------------------------------------------
function refreshBottomTextCtrl()
{
// BottomPrintText.position = "0 0";
}
function refreshCenterTextCtrl()
{
// CenterPrintText.position = "0 0";
}
//------------------------------------------------------------------------------
function LoadScreen::onAdd(%this)
{
%this.qLineCount = 0;
}
//------------------------------------------------------------------------------
function LoadScreen::onWake(%this)
{
// Play sound...
CloseMessagePopup();
}
//------------------------------------------------------------------------------
function LoadScreen::onSleep(%this)
{
// Clear the load info:
if ( %this.qLineCount !$= "" )
{
for ( %line = 0; %line < %this.qLineCount; %line++ )
%this.qLine[%line] = "";
}
%this.qLineCount = 0;
LOAD_MapName.setText( "" );
LOAD_MapDescription.setText( "" );
LoadingProgress.setValue( 0 );
LoadingProgressTxt.setValue( "WAITING FOR SERVER" );
// Stop sound...
}